JBoss Community Archive (Read Only)

SwitchYard 0.7

TCP UDP Binding

SwitchYard provides support for network level integration with TCP and UPD protocols.

The TCP and UDP binding is built on top of camel-netty and supports most of options for this endpoint. Please refer camel documentation for detailed description of them.

SwitchYard 0.7

This binding have it's own namespace. To use it you must declare namespace with uri urn:switchyard-component-camel-netty:config:1.0. Your Maven project should also have following dependency:

  <dependency>
      <groupId>org.switchyard.components</groupId>
      <artifactId>switchyard-component-camel-netty</artifactId>
      <version>SWITCHYARD-VERSION</version>
  </dependency>
Element names

SwitchYard 0.7 and above uses <binding.tcp> and <binding.udp>. Earlier versions uses <binding.netty-tcp> and <binding.netty-udp>.

Generic options

Following options can be apiled to <binding.tcp> and <binding.udp definition:

  • host

  • port

  • receiveBufferSize

  • sendBufferSize

  • reuseAddress

  • encoders

  • decoders

  • allowDefaultCodec

  • workerCount

  • sync

  • disconnect

TCP specific options

  • textline

  • tcpNoDelay

  • keepAlive

UDP specific options

  • broadcast

Binding Services with Files

Here's an example of what a file service binding looks like:

<sca:composite name="camel-binding" targetNamespace="urn:switchyard-quickstart:camel-binding:0.1.0">
    <sca:service name="GreetingService" promote="GreetingService">
        <camel:binding.tcp>
            <camel:host>localhost</camel:host>
            <camel:port>3939</camel:port>
            <camel:allowDefaultCodec>false</camel:allowDefaultCodec>
            <camel:sync>false</camel:sync>
        </camel:binding.tcp>
        <camel:binding.udp>
            <camel:host>localhost</camel:host>
            <camel:port>3940</camel:port>
            <camel:allowDefaultCodec>false</camel:allowDefaultCodec>
            <camel:sync>false</camel:sync>
        </camel:binding.udp>
    </sca:service>
</sca:composite>
JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 09:47:13 UTC, last content change 2012-12-28 14:51:28 UTC.